home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Saar AMOK 2
/
Saar AMOK II - Oktober 1994 (1994)(Kreativ Marketing)(DE)[!][I-7598].iso
/
disks
/
651_700
/
699
/
filer
/
rexx
/
xpk.filer
< prev
next >
Wrap
Text File
|
1994-04-11
|
2KB
|
100 lines
/*
$VER: XPK.filer 2.1 (22.11.93)
Author:
Matthias Scheler (tron@lyssa.pb.owl.de)
Function:
All selected files and directories in the active directory listview will
be packed with XPK. If a compression method is supplied it will be used.
Else a string requester will appear and ask for the method.
Requires:
XPK 2.x or newer
xPack 1.x or newer
Call:
XPK [METHOD]
Example for "Filer.RC":
BUTTON ...,...,"Pack","RX XPK"
or:
BUTTON ...,...,"Nuke'em","RX XPK NUKE"
*/
PARSE ARG Compressor
ADDRESS 'FilerRexx'
OPTIONS RESULTS
LOCKFILER
IF RESULT="RESULT" THEN EXIT 5
Key=Result
PANEL OFF
'STATUS XPK compression'
IF Compressor="" THEN
DO
'SETSTRING NUKE'
'GETSTRING Enter XPK compression method:'
IF RESULT="RESULT" THEN
DO
PANEL ON
UNLOCKFILER Key
'STATUS XPK compression aborted'
EXIT 5
END
Compressor=RESULT
END
GETSOURCEPATH
IF RESULT="RESULT" THEN
DO
PANEL ON
UNLOCKFILER Key
EXIT 5
END
SourceDir=RESULT
GETNUMENTRIES
Num=RESULT
DO Index=1 TO Num
GETNAME Index
Data=RESULT
Name=SUBSTR(Data,2)
IF RIGHT(SourceDir,1)=":" THEN SourceName=SourceDir||Name
ELSE SourceName=SourceDir||"/"||Name
IF LEFT(Data,1)="f" THEN
DO
ADDRESS 'COMMAND' 'xPack "'||SourceName||'" METHOD' Compressor 'ALL'
TOGGLEENTRY Index
'HISTORY "'||SourceName||'" compressed with metmod "'||Compressor||'".'
END
IF LEFT(Data,1)="d" THEN
DO
ADDRESS 'COMMAND' 'xPack "'||SourceName||'" METHOD' Compressor 'ALL'
TOGGLEENTRY Index
'HISTORY Files in directory "'||SourceName||'" compressed with metmod "'||Compressor||'".'
END
END
UPDATESOURCEDIR
'STATUS Operation finished !'
PANEL ON
UNLOCKFILER Key